package pathways.marvin_test;

import java.awt.Dimension;
import java.awt.event.MouseListener;

import chemaxon.marvin.beans.MViewPane;
import chemaxon.marvin.swing.MolPanel;

/**
 * Title:
 * Description:
 * Copyright:    Copyright (c) 2001
 * Company:
 * @author Jia An Chen
 * @version 1.0
 */

public class ConfiguredMarvinPane extends MViewPane {

  public ConfiguredMarvinPane() {
    super();

    this.setPreferredSize(new Dimension(250, 250));
    this.setColorScheme("atomset");
    this.setDispopts(this.getDispopts() | MolPanel.ATNUM_FLAG);
  }

  public void addMouseListener(MouseListener ml) {
    super.addMouseListener(ml);
    for (int i = 0; i < this.mpan.getComponentCount(); i++) {
      this.mpan.getComponent(i).addMouseListener(ml);
//      System.out.println(this.mpan.getComponent(i));
    }
    //.addMouseListener(ml);
  }
}